import Vue from 'vue';
import Router from 'vue-router';
import Home from '@/components/common/Home';
import DashBoard from '@/components/page/DashBoard';
import AmCharts from '@/components/page/BasicCharts';
import FormInput from '@/components/page/FormInput';
import FormLayouts from '@/components/page/FormLayouts';
import BasicTables from '@/components/page/BasicTables';
import EditorPage from '@/components/page/EditorPage';
import MarkdownPage from '@/components/page/MarkdownPage';
import TodoList from '@/components/page/TodoListPage';
import DistributeUser from '@/components/page/DistributeUser';
import AppointmentClinic from '@/components/page/AppointmentClinic';
import HospitalInfo from '@/components/page/HospitalInfo';
import VaccineNumber from '@/components/page/VaccineNumber';
import SeminarInfo from '@/components/page/SeminarInfo';
import FamiliyDoctor from '@/components/page/FamiliyDoctor';
import SectionDoctor from '@/components/page/SectionDoctor';
import CurrentMonth from '@/components/page/CurrentMonth';
import MonthlyattendanceRecord from '@/components/page/MonthlyattendanceRecord';
import assigner from '@/components/page/assigner';
import Login from '@/views/login/login';
import  test from '@/views/test/test';
Vue.use(Router)

export const constantRouterMap = [
  {
    path:'/',
    component:Login
  },
  {
    path: '/Home',
    component: Home,
    children:[
      {
        path:'',
        component:DashBoard
      },{
        path:'/DashBoard',
        component:DashBoard
      },{
        path:'/EditorPage',
        component:EditorPage
      },{
        path:'/MarkdownPage',
        component:MarkdownPage
      },{
        path:'/BasicCharts',
        component:AmCharts
      },{
        path:'/FormInput',
        component:FormInput
      },{
        path:'/FormLayouts',
        component:FormLayouts
      },{
        path:'/BasicTables',
        component:BasicTables
      },{
        path:'/TodoList',
        component:TodoList
      },
      {
        path:'/DistributeUser',
        component: DistributeUser
      },
      {
        path:'/AppointmentClinic',
        component:AppointmentClinic
      },
      {
        path:'/HospitalInfo',
        component:HospitalInfo
      },
      {
        path:'/VaccineNumber',
        component:VaccineNumber
      },
      {
        path:'/SeminarInfo',
        component:SeminarInfo
      },
      {
        path:'/FamiliyDoctor',
        component:FamiliyDoctor
      },{
        path:'/SectionDoctor',
        component:SectionDoctor
      },
      {
        path:'/CurrentMonth',
        component:CurrentMonth
      },
      {
        path:'/MonthlyattendanceRecord',
        component:MonthlyattendanceRecord
      },{
        path:'/assigner',
        component:assigner
      }
    ]
  },
  // {
  //   path:'/Login',
  //   component:Login
  // },{
  //   path:'/test',
  //   component:test
  // }
]

export default new Router({
  scrollBehavior:() => ({ y:0 }),
  routes:constantRouterMap
})